package String;

import java.util.Scanner;

public class stringBuilder {
    public static <Person> void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        StringBuilder str = new StringBuilder();
        str.append("2210305341").append("赵诚挚").append(18);
        System.out.println(str);
        str.delete(10,14);
        str.append("男");
        System.out.println(str);
        person P1 = new person("胡喜超","001",1);
        str.append(P1);
        System.out.println(str);
    }
}
class person{
    private String name;
    private String id;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public person(String name, String id, int age) {
        this.name = name;
        this.id = id;
        this.age = age;
    }

    public person() {
    }

    @Override
    public String toString() {
        return "person{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", age=" + age +
                '}';
    }
}